function dosubmit(formname, targetaction) {
	  var theForm=document.getElementById(formname);
	  theForm.action = targetaction;
	  theForm.submit();
	}

function textCounter(field, maxlimit) {
	if (field.value.length > maxlimit) // if too long...trim it!
		alert('Maximum ' + maxlimit + ' character is allowed.')
	field.value = field.value.substr(0, maxlimit);
	}